<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8"/>
    <title>hello spring security</title>
</head>
<body>
    <h1>hello spring security</h1>
    <p>权限不够</p>
    <div sec:authorize="isAuthenticated()">
        <p>已有用户登录</p>
        <p>用户：<span sec:authentication="name"></span></p>
        <p>用户：<span sec:authentication="principal.authorities"></span></p>
        <div sec:authentication="isAnonymous()">
            <p>
                未有用户登录
            </p>
        </div>
    </div>
    <p>
        拒绝访问
    </p>
</body>
</html>